package com.hhkj.api.train.controller;

import com.hhkj.admin.train.domain.Train;
import com.hhkj.api.common.session.holder.model.LoginStudent;
import com.hhkj.api.train.service.biz.ApiTrainHistoryBizService;
import com.ruoyi.framework.login.api.ApiLogin;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


/**
 * 历史培训 Controller
 *
 * @author ruoyi
 * @since 2023-05-25
 */
@RestController
@RequestMapping("/api/student/train/history")
public class ApiTrainHistoryController extends BaseController {
    @Autowired
    private ApiTrainHistoryBizService historyTrainBizService;

    /**
     * 分页查询历史模拟考试
     */
    @ApiLogin(LoginStudent.class)
    @PostMapping("/page")
    public TableDataInfo pageHistoryTrain(@RequestBody Train train) {
        startPageBody(train);
        return getDataTable(historyTrainBizService.pageHistoryTrain(train));
    }

}
